package com.tianyi.sfzy1.service;

import com.tianyi.sfzy1.domain.Notification;
import com.tianyi.sfzy1.mapper.NotificationMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class NotificationService {
    @Autowired
    private NotificationMapper notificationMapper;
    public int insertNotification(Notification notification){
        return notificationMapper.insertNotification(notification);
    }

    //根据会员id查询通知
    public List<Notification> findNotificationByMemberId(int memberId){
        return notificationMapper.findNotificationByMemberId(memberId);
    }
}
